v a r   c o n f i g T i t l e s   =   [ " L a n g u a g e " ,   " C r e d i t s " ,   " R e s o l u t i o n "   ] ; 
 
 v a r   c o n f i g O n S e l e c t i o n s   =   [ " J a p a n e s e " ,   " O n " ,   " 6 4 0  4 8 0 "   ] ; 
 
 v a r   c o n f i g O f f S e l e c t i o n s   =   [ " E n g l i s h " ,   " O f f " ,   " 8 5 4  4 8 0 "   ] ; / /   %1 6 : 9 %
 
 v a r   c o n f i g S e t t i n g s   =   [   S y s t e m . i s L a n g u a g e P r i m a r y ( ) ,   g e t F l a g ( " C r e d i t " ) ,   [ R e n d e r e r . g e t W i d t h ( ) ,   R e n d e r e r . g e t H e i g h t ( ) ]   ] ; 
 
 v a r   c u r s o r X   =   0 ; 
 
 v a r   c u r s o r Y   =   0 ; 
 
 / / f u n c t i o n   C o n f i g I n i t ( ) 
 
 / / { 
 
 / / 	 c u r s o r X   =   0 ; 
 
 / / 	 c u r s o r Y   =   0 ; 
 
 / / } 
 
 
 
 f u n c t i o n   C o n f i g I s O n ( i n d e x ) 
 
 { 
 
 	 i f   ( i n d e x   = =   0 )   r e t u r n   S y s t e m . i s L a n g u a g e P r i m a r y ( ) ; 
 
 	 i f   ( i n d e x   = =   1 )   r e t u r n   ! g e t F l a g ( " C r e d i t " ) ; 
 
 	 i f   ( i n d e x   = =   2 )   r e t u r n   R e n d e r e r . g e t W i d t h ( )   = =   6 4 0   & &   R e n d e r e r . g e t H e i g h t ( )   = =   4 8 0 ; 
 
 	 r e t u r n   f a l s e ; 
 
 } 
 
 
 
 f u n c t i o n   C o n f i g S w i t c h ( i n d e x ) 
 
 { 
 
 	 i f   ( i n d e x   = =   0 )   { 
 
 	 	 S y s t e m . t o g g l e L a n g u a g e s ( ) ; 
 
 	 } 
 
 	 i f   ( i n d e x   = =   1 )   { 
 
 	 	 s e t F l a g ( " C r e d i t " ,   C o n f i g I s O n ( i n d e x ) ) ; 
 
 	 } 
 
 	 i f   ( i n d e x   = =   2 )   { 
 
 	 	 i f   ( C o n f i g I s O n ( i n d e x ) ) 
 
 	 	 	 G a m e S e t t i n g s . s e t R e s o l u t i o n ( 8 5 4 ,   4 8 0 ) ; 
 
 	 	 e l s e 
 
 	 	 	 G a m e S e t t i n g s . s e t R e s o l u t i o n ( 6 4 0 ,   4 8 0 ) ; 
 
 	 } 
 
 } 
 
 
 
 f u n c t i o n   C o n f i g O K ( ) 
 
 { 
 
 	 / / s c e n e F u n c t i o n   =   T i t l e S c e n e ; 
 
 	 s a v e ( ) ; 
 
 	 c h a n g e S c e n e ( " T i t l e " ) ; 
 
 } 
 
 
 
 f u n c t i o n   C o n f i g C a n c e l ( ) 
 
 { 
 
 	 i f   ( c o n f i g S e t t i n g s [ 0 ]   ! =   S y s t e m . i s L a n g u a g e P r i m a r y ( ) ) 
 
 	 	 S y s t e m . t o g g l e L a n g u a g e s ( ) ; 
 
 	 s e t F l a g ( " C r e d i t " ,   c o n f i g S e t t i n g s [ 1 ] ) ; 
 
 	 G a m e S e t t i n g s . s e t R e s o l u t i o n ( c o n f i g S e t t i n g s [ 2 ] [ 0 ] ,   c o n f i g S e t t i n g s [ 2 ] [ 1 ] ) ; 
 
 	 c h a n g e S c e n e ( " T i t l e " ) ; 
 
 } 
 
 
 
 / /   G a m e . t x t   n0  o n E n t e r F r a m e ( )   g0k0000T0h0k0Y00Qt
 
 f u n c t i o n   C o n f i g S c e n e ( g :   G r a p h i c s ) 
 
 { 
 
 	 C o n f i g U p d a t e ( ) ; 
 
 	 C o n f i g D r a w ( g ) ; 
 
 } 
 
 
 
 f u n c t i o n   C o n f i g U p d a t e ( ) 
 
 { 
 
 	 i f   ( K e y . i s T y p e d ( K e y . R I G H T ) )   { 
 
 	 	 c u r s o r X + + ; 
 
 	 } 
 
 	 e l s e   i f   ( K e y . i s T y p e d ( K e y . L E F T ) )   { 
 
 	 	 c u r s o r X - - ; 
 
 	 } 
 
 	 e l s e   i f   ( K e y . i s T y p e d ( K e y . U P ) )   { 
 
 	 	 c u r s o r Y - - ; 
 
 	 	 i f   ( c u r s o r Y   <   0 ) 
 
 	 	 	 c u r s o r Y   =   c o n f i g T i t l e s . l e n g t h ( ) ; 
 
 	 } 
 
 	 e l s e   i f   ( K e y . i s T y p e d ( K e y . D O W N ) )   { 
 
 	 	 c u r s o r Y + + ; 
 
 	 	 i f   ( c u r s o r Y   >   c o n f i g T i t l e s . l e n g t h ( ) ) 
 
 	 	 	 c u r s o r Y   =   0 ; 
 
 	 } 
 
 	 e l s e   i f   ( K e y . i s C a n c e l K e y T y p e d ( ) )   { 
 
 	 	 C o n f i g C a n c e l ( ) ; 
 
 	 } 
 
 	 e l s e   i f   ( K e y . i s T y p e d ( K e y . S T A R T ) )   { 
 
 	 	 C o n f i g O K ( ) ; 
 
 	 } 
 
 	 e l s e   i f   ( K e y . i s O k K e y T y p e d ( ) )   { 
 
 	 	 C o n f i g S w i t c h ( c u r s o r Y ) ; 
 
 	 	 i f   ( c u r s o r Y   = =   c o n f i g T i t l e s . l e n g t h ( ) )   { 
 
 	 	 	 C o n f i g O K ( ) ; 
 
 	 	 } 
 
 	 } 
 
 } 
 
 
 
 f u n c t i o n   C o n f i g D r a w ( g :   G r a p h i c s ) 
 
 { 
 
 	 / /   G a m e S e t t i n g s . s e t R e s o l u t i o n ( )   g0000L0	YfU00_04XTo00000
 
 	 i f   ( g . g e t W i d t h ( )   ! =   R e n d e r e r . g e t W i d t h ( )   | |   g . g e t H e i g h t ( )   ! =   R e n d e r e r . g e t H e i g h t ( ) )   { 
 
 	 	 g . s e t S i z e ( R e n d e r e r . g e t W i d t h ( ) ,   R e n d e r e r . g e t H e i g h t ( ) ) ; 
 
 	 } 
 
 	 / /   00000000P^k0_X0f0	Yf
 
 	 F O N T _ S I Z E   =   G r a p h i c s . g e t D e f a u l t F o n t S i z e ( ) ; 
 
 
 
 	 / /   d r a w   f r a m e 
 
 	 v a r   x   =   F O N T _ S I Z E ; 
 
 	 v a r   y   =   F O N T _ S I Z E ; 
 
 	 g . d r a w F r a m e ( x ,   y ,   R e n d e r e r . g e t W i d t h ( ) - x * 2 ,   R e n d e r e r . g e t H e i g h t ( ) - y * 2 ) ; 
 
 
 
 	 / /   d r a w   c o n f i g   i t e m s 
 
 	 / / v a r   w i d t h   =   F O N T _ S I Z E * 6 ; 
 
 	 / / v a r   w i d t h 2   =   F O N T _ S I Z E * 4 ; ; 
 
 	 v a r   w i d t h     =   F O N T _ S I Z E * 1 0 ; 
 
 	 v a r   w i d t h 2   =   F O N T _ S I Z E * 7 ; 
 
 	 v a r   h e i g h t   =   F O N T _ S I Z E * 1 . 6 ; 
 
 	 x   =   ( R e n d e r e r . g e t W i d t h ( ) - w i d t h - w i d t h 2 * 2 ) / 2 ; 
 
 	 y   =   F O N T _ S I Z E * 8 ; / / F O N T _ S I Z E * 2 ; 
 
 	 g . s e t F o n t S i z e ( F O N T _ S I Z E * 1 . 4 ) ; 
 
 / / 	 g . s e t T e x t A l i g n ( T e x t A l i g n . L E F T ) ;   / /   00000][[0k0-[
 
 g . s e t T e x t A l i g n ( T e x t A l i g n . C E N T E R ) ;   / /   00000-N.Y[[0k0-[
 
 	 f o r   ( v a r   i   =   0 ;   i   <   c o n f i g T i t l e s . l e n g t h ;   + + i )   { 
 
 	 	 v a r   f o c u s e d   =   c u r s o r Y   = =   i ; 
 
 	 	 C o n f i g D r a w I t e m ( g ,   c o n f i g T i t l e s [ i ] ,                 x ,                             y ,   w i d t h ,   h e i g h t ,   t r u e ,   f o c u s e d ) ; 
 
 	 	 C o n f i g D r a w I t e m ( g ,   c o n f i g O n S e l e c t i o n s [ i ]   ,   x + w i d t h ,                 y ,   w i d t h 2 ,   h e i g h t ,   C o n f i g I s O n ( i ) ,   f o c u s e d ) ; 
 
 	 	 C o n f i g D r a w I t e m ( g ,   c o n f i g O f f S e l e c t i o n s [ i ] ,   x + w i d t h + w i d t h 2 ,   y ,   w i d t h 2 ,   h e i g h t ,   ! C o n f i g I s O n ( i ) ,   f o c u s e d ) ; 
 
 	 	 y   + =   h e i g h t ; 
 
 	 } 
 
 	 C o n f i g D r a w I t e m ( g ,   " R e t u r n   t o   T i t l e " ,   x ,   y ,   w i d t h + w i d t h 2 * 2 ,   h e i g h t ,   t r u e ,   c u r s o r Y   = =   c o n f i g T i t l e s . l e n g t h ) ; 
 
 
 
 	 / /   d r a w   h e l p 
 
 / / 	 v a r   t i t l e T e x t   =   
 
 / / 	 	 " [ A ] g0 0x00S0F0 0[ B ] g0 000000\ n " 
 
 / / 	 	 " \ n " 
 
 / / 	 	 " [ S T A R T ] g0 0W00F000F0                      " ; 
 
 	 v a r   t i t l e T e x t   =   
 
 	 	 " P r e s s   [ A ]   t o   c h a n g e .   P r e s s   [ B ]   t o   c a n c e l \ n " 
 
 	 	 " \ n " 
 
 	 	 " P r e s s   [ S T A R T ]   t o   e x i t                                       " ; 
 
 	 g . s e t F o n t S i z e ( F O N T _ S I Z E * 0 . 8 ) ; 
 
 	 g . d r a w S t r i n g ( t i t l e T e x t ,   R e n d e r e r . g e t W i d t h ( ) / 2 ,   R e n d e r e r . g e t H e i g h t ( ) - F O N T _ S I Z E * 6 ) ; 
 
 } 
 
 
 
 f u n c t i o n   C o n f i g D r a w I t e m ( g :   G r a p h i c s ,   t e x t :   S t r i n g ,   x ,   y ,   w i d t h ,   h e i g h t ,   s e l e c t e d ,   f o c u s e d ) 
 
 { 
 
 	 / /   d r a w   b a c k g r o u n d 
 
 	 i f   ( f o c u s e d )   { 
 
 	 	 g . s e t F i l l C o l o r ( # f 0 0 ) ; 
 
 	 } 
 
 	 e l s e   { 
 
 	 	 g . s e t F i l l C o l o r ( # 2 d 2 d 2 d ) ; 
 
 	 } 
 
 	 g . f i l l R e c t ( x ,   y ,   w i d t h ,   h e i g h t ) ; 
 
 	 t e x t   =   S t r i n g T a b l e . g e t ( t e x t ) ; 
 
 	 / /   d r a w   t e x t 
 
 	 i f   ( s e l e c t e d )   { 
 
 	 	 g . d r a w B o r d e r S t r i n g ( t e x t . t o U p p e r C a s e ( ) ,   x + w i d t h / 2 ,   y + 2 ,   # f f 3 ,   0 ) ; 
 
 	 } 
 
 	 e l s e   { 
 
 	 	 g . d r a w B o r d e r S t r i n g ( t e x t . t o U p p e r C a s e ( ) ,   x + w i d t h / 2 ,   y + 2 ,   # 1 1 1 ,   0 ) ; 
 
 	 } 
 
 	 
 
 	 / /   d r a w   f r a m e 
 
 	 g . d r a w F r a m e ( x ,   y ,   w i d t h ,   h e i g h t ) ; 
 
 } 
 
 
 
 / / 	 i f   ( i n d e x   = =   2 )   { 
 
 / / 	 	 i f   ( C o n f i g I s O n ( i n d e x ) ) 
 
 / / 	 	 	 G a m e S e t t i n g s . s e t A s p e c t R a t i o ( 1 6   /   9 ) ; 
 
 / / 	 	 e l s e 
 
 / / 	 	 	 G a m e S e t t i n g s . s e t A s p e c t R a t i o ( 4   /   3 ) ; 
 
 / / 	 } 
 
 / / 	 v a r   t i t l e T e x t   =   
 
 / / 	 	 " [ A ] g0 0x00S0F0                                      \ n " 
 
 / / 	 	 " \ n " 
 
 / / 	 	 " [ B ] K0[ S T A R T ] g0 0W00F000F0            " ; 
 
 / / v a r   s o u n d E n a b l e d :   S t r i n g   =   I n i F i l e . r e a d ( " C o n f i g " ,   " s o u n d E n a b l e d " ) ; 
 
 / / v a r   l a n g u a g e :   S t r i n g   =   I n i F i l e . r e a d ( " C o n f i g " ,   " l a n g u a g e " ) ; 
 
 / / 	 	 	 I n i F i l e . w r i t e ( " C o n f i g " ,   " s o u n d E n a b l e d " ,   s o u n d E n a b l e d ) ; 
 
 / / 	 	 	 A u d i o . s e t S o u n d E n a b l e d ( s o u n d E n a b l e d ) ; 